class UserF{
    public name:string;
    private _age:number;
    public sex:string;

    constructor(name:string,age:number,sex:string){
        this.name = name ;
        this._age = age ;
        this.sex = sex ;
    }

    say():void{
        console.log(this.name, this._age, this.sex);
    }

    get age(){
        return this._age;
    }

    set age(nv){
        this._age = nv;
    }
}

var user10:UserF = new UserF("asd",20,"m");
console.log(user10.name);
console.log(user10.age);
console.log(user10.sex);